package com.ecoolex.hotel.saas.ws;

import java.util.List;

import com.ecoolex.framework.common.exception.BizException;
import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.framework.common.pojo.Sorting;
import com.ecoolex.hotel.saas.entity.StoreAd;
import com.ecoolex.hotel.saas.entity.StoreAdPosition;
import com.ecoolex.hotel.saas.pojo.QueryStoreAdDTO;

public interface StoreAdService {

	StoreAd addAd(StoreAd record, List<StoreAdPosition> positionList, String createUser) throws BizException;

	StoreAd updateAd(StoreAd record, List<StoreAdPosition> positionList, String updateUser) throws BizException;

    void deleteAd(int adId, String updateUser) throws BizException;

    void releaseAd(int adId, String updateUser) throws BizException;

    void offlineAd(int adId, String updateUser) throws BizException;

    int checkAdExpiredAndUpdateStatus(String updateUser);

    Pagination<StoreAd> queryAd(QueryStoreAdDTO query, Sorting[] sorts, Page page);

    List<StoreAd> queryEffectiveAd(Integer storeId, String position, String[] positionValue, int size);

    List<StoreAdPosition> queryAdPositionByAdId(int adId);

    StoreAd getAdByAdId(int adId);
}
